home *** CD-ROM | disk | FTP | other *** search
/ CD Fun House 1 / CD Fun House (Wayzata Technology).iso / •The Arcade• / RoboWar •••• / Robots Folder / Freud / Freud next >
Text File  |  1990-04-27  |  1KB  |  74 lines

  1. # Freud
  2. # Created 3/12/90 by David Harris
  3. # Has no relation whatsoever to any bears.
  4.  
  5. Init:
  6.     3 speedx' store
  7.     3 speedy' store
  8.  
  9. Main:
  10.     collision handleCollision if
  11.     range shootSub if
  12.     x 30 < leftEdge if
  13.     x 270 > rightEdge if
  14.     collision handleCollision if
  15.     y 60 < topEdge if
  16.     y 270 > bottomEdge if
  17.     aim 17 + aim' store
  18.     energy 90 > letOffSteam if
  19.     Main jump
  20.  
  21. leftEdge:
  22.     2 random 120 / + speedx' store
  23.     return
  24.  
  25. rightEdge:
  26.     -2 random 120 / - speedx' store
  27.     return
  28.  
  29. topEdge:
  30.     2 random 120 / + speedy' store
  31.     return
  32.  
  33. bottomEdge:
  34.     -2 random 120 / - speedy' store
  35.     return
  36.  
  37. shootSub:
  38.     energy missile' store
  39.     aim 30 - aim' store
  40.     return
  41.  
  42. letOffSteam:
  43.     40 missile' store
  44.     return
  45.  
  46. handleCollision:
  47.     range checkTarget if
  48.     aim 70 + aim' store
  49.     collision repeatSearch endSearch ife
  50.  
  51. checkTarget:
  52.     range 35 < foundTarget if
  53.     return
  54.  
  55. foundTarget:
  56.     50 missile' store
  57.     range targetPresent targetDead ife
  58.  
  59. targetPresent:
  60.     drop
  61.     foundTarget jump
  62.  
  63. targetDead:
  64.     drop
  65.     return  # to checkTarget
  66.  
  67. repeatSearch:
  68.     drop
  69.     handleCollision jump
  70.  
  71. endSearch:
  72.     drop
  73.     return